package com.cyy.common;

import lombok.Data;

@Data
public class CommonException extends RuntimeException{

    private String code;

    private String msg;

    public CommonException(String msg){
        super(msg);
        this.code = ResData.FAIL;
        this.msg = msg;
    }
    public CommonException(String msg,Throwable e){
        super(msg,e);
        this.code = ResData.FAIL;
        this.msg = msg;
    }

    public CommonException(String code,String msg){
        super(msg);
        this.code = code;
        this.msg = msg;
    }

    public CommonException(String code,String msg,Throwable e){
        super(msg,e);
        this.code = code;
        this.msg = msg;
    }
}
